package com.lw.oop.daytwo;

/**
 * @author liuwei
 * @ClassName Total.java
 * @description: TODO
 * @date 2023年06月13日
 * @version: 1.0
 */
public class Total {
    public static void main(String[] args) {
        int num=0;
        for (int i = 0; i <=100 ; i++) {
            num= num + i;
        }

        System.out.println("1-100求和为："+ num);


        int num1 = 0;
        for (int i = 0; i <= 100; i+=2) {
            num1 = num1 + i;
        }
        System.out.println("1-100偶数和为："+num1);


    }
}
